package hy.config;

import com.ImportDefReg;
import com.MySelector;
import com.OutCfg;
import com.Stu;
import hy.entity.Dog;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;

@ImportResource(locations="classpath:a.xml")
@Configuration
@Import({Stu.class, OutCfg.class, MySelector.class, ImportDefReg.class})
public class MyCfg {

    @ConfigurationProperties(prefix = "dog")
    @Bean("dog")
    public Dog getDog(){
        return new Dog();
    }
}
